Skip to main content
Version: Upcoming

SRAlertRecord

V8 Message Definiton

METADATA

AttributeValue
Topic3985-parent-orders
MLink TokenClientTrading
ProductSRTrade
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
accntVARCHAR(16)PRI''SpiderRock trading accnt broker pkey
clientFirmVARCHAR(16)PRI''SR client firm
userNameVARCHAR(24)PRI''
alertTypeVARCHAR(24)PRI''
alertSourceVARCHAR(24)PRI''
alertPriorityenum - AlertPriorityPRI'None'
histWindowINTPRI0counter 10 most recent event window
alertTextTINYTEXT''
counterINT0
timestampDATETIME(6)'1900-01-01 00:00:00.000000'timestamp of last modification

PRIMARY KEY DEFINITION (Unique)

FieldSequence
accnt1
clientFirm2
userName3
alertType4
alertSource5
alertPriority6
histWindow7

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRTrade`.`MsgSRAlertRecord` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SpiderRock trading accnt [broker pkey]',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`userName` VARCHAR(24) NOT NULL DEFAULT '',
`alertType` VARCHAR(24) NOT NULL DEFAULT '',
`alertSource` VARCHAR(24) NOT NULL DEFAULT '',
`alertPriority` ENUM('None','Low','High') NOT NULL DEFAULT 'None',
`histWindow` INT NOT NULL DEFAULT 0 COMMENT 'counter % 10 (most recent event window)',
`alertText` TINYTEXT NOT NULL DEFAULT '',
`counter` INT NOT NULL DEFAULT 0,
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
PRIMARY KEY USING HASH (`accnt`,`clientFirm`,`userName`,`alertType`,`alertSource`,`alertPriority`,`histWindow`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';

SELECT TABLE EXAMPLE QUERY

SELECT
`accnt`,
`clientFirm`,
`userName`,
`alertType`,
`alertSource`,
`alertPriority`,
`histWindow`,
`alertText`,
`counter`,
`timestamp`
FROM `SRTrade`.`MsgSRAlertRecord`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a VARCHAR(24) */
`userName` = 'Example_userName'
AND
/* Replace with a VARCHAR(24) */
`alertType` = 'Example_alertType'
AND
/* Replace with a VARCHAR(24) */
`alertSource` = 'Example_alertSource'
AND
/* Replace with a ENUM('None','Low','High') */
`alertPriority` = 'None'
AND
/* Replace with a INT */
`histWindow` = 5;

Doc Columns Query

SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SRAlertRecord' ORDER BY ordinal_position ASC;